#ifndef VID_DIRECTX_SUPPORT_H
#define VID_DIRECTX_SUPPORT_H

#include <ddraw.h>

// General
void vidSExit();
int vidSInit(IDirectDraw7* pDD7);

// Miscellaneous
int vidSGetSurfaceDepth(IDirectDrawSurface7* pSurf);
int vidSClearSurface(IDirectDrawSurface7* pSurf, unsigned int colour, RECT* pRect);

// Select optimal full-screen resolution
struct VidSDisplayScoreInfo {
	// Filled in advance by the caller
	unsigned requestedWidth; unsigned requestedHeight; unsigned requestedDepth; unsigned requestedZoom;
	unsigned modeWidth; unsigned modeHeight; unsigned modeDepth;
	// Filled by the scoring routine
	unsigned bestWidth; unsigned bestHeight; unsigned bestDepth;
	unsigned bestScore;
};

int vidSScoreDisplayMode(VidSDisplayScoreInfo* scoreInfo);
int vidSInitScoreInfo(VidSDisplayScoreInfo* scoreInfo);

void vidSRestoreScreenMode();
int vidSEnterFullscreenMode(int zoom, unsigned depth);

// Text display
void vidSExitOSD();
int vidSInitOSD(int flags);
int vidSRestoreOSD();
void vidSDisplayOSD(IDirectDrawSurface7* pSurf, RECT* rect, int flags);

int vidSNewShortMsg(const wchar_t* text, int rgb = 0, int duration = 0, int piority = 5);
void vidSKillShortMsg();
int vidSNewTinyMsg(const wchar_t* text, int rgb = 0, int duration = 0, int piority = 5);
void vidSKillTinyMsg();

extern wchar_t OSDMsg[128];
extern unsigned int OSDTimer;
extern wchar_t tinyMsg[64];
extern unsigned int tinyTimer;

// osd text display for dx9, added by regret
void vidSKillOSDMsg();
void vidSKillTinyOSDMsg();

#endif
